package oschina.zhangchaozheng.demo.demo_1_3.web;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Created by zcz on 2017/6/28.
 */
@Controller
public class HelloController {

    @RequestMapping("/velocity")
    public String velocity(ModelMap map) {
        map.addAttribute("info", "Hello Velocity!");
        return "velocity";
    }

    @RequestMapping("/testError")
    public String error(ModelMap map) {
        throw new RuntimeException("Hello Error!");
    }

}
